package com.itheima.demo1;

import java.io.Serializable;

/*
1. 定义一个学员类，有以下
   属性：姓名、性别、年龄、分数
   无参、全参构造方法，get/set方法
2. 定义main()方法，定义一个存储Student的集合，并初始化一些数据：
 */
public class Student implements Serializable {
    private final static long serialVersionUID=1L;
    private String name;
    private String sex;
    private int age ;
    private double score;

    public Student() {
    }

    public Student(String name, String sex, int age, double score) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return  name +
                ", " + sex +
                "," + age +
                "," + score;

    }
}
